package com.ics.atable.chat.model.enums;

import lombok.Getter;

/**
 * 返回类型枚举类
 *
 * @author haohongbin
 */
@Getter
public enum ResponseTypeEnum {
    STRING("string", "字符串"),
    NODE_OBJECT("node_object", "节点对象");

    private final String code;
    private final String info;

    ResponseTypeEnum(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public static ResponseTypeEnum getByCode(String code) {
        for (ResponseTypeEnum responseTypeEnum : ResponseTypeEnum.values()) {
            if (responseTypeEnum.getCode().equals(code)) {
                return responseTypeEnum;
            }
        }
        return null;
    }


}
